/* 软件许可配置数据 
 * Author:      yangjq 
 * CreateTime:  2023/12/2 20:59:07 
 * LastEditor:  yangjq 
 * ModifyTime:  2023/12/5 20:08:08 
 * Description: 
*/
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {h} from "vue";
import {Tag} from "ant-design-vue";
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '软件名称',
    align: "center",
    dataIndex: 'softwarename'
  },
  {
    title: '显示顺序',
    align: "center",
    dataIndex: 'sortNo',
  },  
  // {
  //   title: '软件公司',
  //   align: "center",
  //   dataIndex: 'softwarecompany'
  // },
  {
    title: '是否展示',
    align: "center",
    dataIndex: 'isshow',
    customRender: (text: any) => {
      if (text.value==1){
        return h(Tag, { color: 'green' }, () => '正常展示' )
      }else{
        return h(Tag, { color: 'orange' }, () => '不展示' )
      }
    },
  },
  // {
  //   title: 'describe',
  //   align: "center",
  //   dataIndex: 'describe'
  // },
  // {
  //   title: 'type',
  //   align: "center",
  //   dataIndex: 'type'
  // },
  // {
  //   title: 'softwarechinesename',
  //   align: "center",
  //   dataIndex: 'softwarechinesename'
  // },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: 'softwarename',
    field: 'softwarename',
    component: 'InputTextArea',
  },
  {
    label: 'softwarecompany',
    field: 'softwarecompany',
    component: 'InputTextArea',
  },
  {
    label: 'describe',
    field: 'describe',
    component: 'InputTextArea',
  },
  {
    label: 'type',
    field: 'type',
    component: 'InputTextArea',
  },
  {
    label: 'softwarechinesename',
    field: 'softwarechinesename',
    component: 'InputTextArea',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
